package edu.tomee.db;

import java.sql.Timestamp;

public class MsgBox {
	private String message;
	private String sender;
	private String id;
	private String status;
	private String teaser;
	private String time;
	
	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getTeaser() {
		if( null != this.message && !message.isEmpty() ){
			if( message.length()>20 ){
				this.teaser = this.message.substring(0, 7);
			}else{
				this.teaser = this.message;
			}
		}
		return teaser;
	}

	public void setTeaser(String teaser) {
		this.teaser = teaser;
	}

	public MsgBox() {
	}

	public String getMessage() {
		return message;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "MsgBox [message=" + message + ", sender=" + sender + ", id="
				+ id + ", status=" + status + "]";
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
